import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  actions: { //逻辑动作
    
  },  
  mutations: { 
    showNews(context, payload) {
      context.newsData.on = payload.on
      context.newsData.data = payload.data
    }
  },
  state: { //状态
    newsData: {
      on: false, //新闻内容开关
      data: {} //新闻数据
    }
  },
  modules: {}
})